// 通关管理报关单表头表单组件
<template>
    <div>
        <Form
            class="declare-form"
            ref="form"
            :model="form"
            :rules="formRules"
            :show-message="false"
            v-blur="blurEvent"
            v-focusJump="{
                onEnter: enterEvent,
                onLast: handleLastEnter,
                dynamic: true
            }"
        >
            <Row>
                <iCol class="form-label" span="3">委托单位</iCol>
                <iCol span="5">
                    <FormItem
                        prop="custId"
                        class="formInput requireBG custId"
                        :error="tips.custId"
                    >
                        <RemoteSearch
                            :disabled="disabled"
                            :title="tips.custId"
                            v-model="form.custId"
                            :keyword="form.custName"
                            :list="custIdList"
                            keywordFiled="custName"
                            valueField="custId"
                            :labelFieldList="['custId', 'custName']"
                            @on-get-name="(name)=>{form.custName=name}"
                        >
                        </RemoteSearch>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="3">内部编号</iCol>
                <iCol span="4">
                    <FormItem prop="declareNo" class="formInput">
                        <Input disabled v-model="form.declareNo" ></Input>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="3">申报地海关</iCol>
                <iCol span="6">
                    <FormItem
                        class="formInput requireBG declPort"
                        prop="declPort"
                        :error="tips.declPort"
                    >
                        <RemoteSearch
                            :disabled="disabled"
                            :title="tips.declPort"
                            v-model="form.declPort"
                            :keyword="form.declPortName"
                            :list="customsCodeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                            @on-get-name="(name)=>{form.declPortName=name}"
                        >
                        </RemoteSearch>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol class="form-label" span="3">申报状态</iCol>
                <iCol span="5">
                    <FormItem prop="businessStatusName" class="formInput">
                        <Input disabled v-model="form.businessStatusName" ></Input>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="3">统一编号</iCol>
                <iCol span="4">
                    <FormItem prop="seqNo" class="formInput">
                        <Input disabled v-model="form.seqNo" ></Input>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="3">预录入编号</iCol>
                <iCol span="6">
                    <FormItem prop="preEntryId" class="formInput">
                        <Input disabled v-model="form.preEntryId" ></Input>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol class="form-label" span="3">海关编号</iCol>
                <iCol span="5">
                    <FormItem prop="entryId" class="formInput">
                        <Input disabled v-model="form.entryId" ></Input>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="3">
                    {{ (isImport || $route.name === 'declareAddIM') ? "进" : "出"}}{{ isBorder ? "境" : "口" }}关别</iCol>
                <iCol span="4">
                    <FormItem
                        class="formInput requireBG iePort"
                        prop="iePort"
                        :error="tips.iePort"
                    >
                        <RemoteSearch
                            :disabled="disabled"
                            :title="tips.iePort"
                            v-model="form.iePort"
                            :keyword="form.iePortName"
                            :list="customsCodeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                            @on-get-name="(name)=>{form.iePortName=name}"
                        >
                        </RemoteSearch>
                    </FormItem>
                </iCol>

                <iCol class="form-label" span="3">备案号</iCol>
                <iCol span="6">
                    <FormItem
                        prop="manualNo"
                        class="formInput manualNo"
                        :error="tips.manualNo"
                    >
                        <Input
                            :disabled="disabled"
                            :maxlength="12"
                            v-model="form.manualNo"
                            :title="tips.manualNo"
                        >
                        </Input>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol class="form-label" span="3">合同协议号</iCol>
                <iCol span="5">
                    <FormItem
                        prop="contrNo"
                        class="formInput contrNo"
                        :error="tips.contrNo"
                    >
                        <Input
                            :disabled="disabled"
                            :maxlength="32"
                            v-model="form.contrNo"
                            :title="tips.contrNo"
                        >
                        </Input>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="3">
                    {{ (isImport || $route.name === 'declareAddIM') ? "进" : "出"}}{{ isBorder ? "境" : "口" }}日期
                </iCol>
                <iCol span="4">
                    <FormItem
                        class="alldata ieDate"
                        :class="{requireBG: isImport}"
                        prop="ieDate"
                        :error="tips.ieDate"
                    >
                        <DatePicker
                            :value="form.ieDate"
                            :disabled="disabled"
                            :title="tips.ieDate"
                            type="date"
                            @on-change="handleDateChange($event, 'ieDate')"
                        >
                        </DatePicker>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="3">申报日期</iCol>
                <iCol span="6">
                    <FormItem prop="declareDate" class="formInput" >
                        <Input disabled v-model="form.declareDate" ></Input>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol
                    class="form-label"
                    span="3"
                >{{ isImport ? "境内收" : "境内发" }}货人</iCol>
                <iCol span="5">
                    <FormItem
                        prop="tradeCoScc"
                        class="formInput requireBG"
                        :error="tips.tradeCoScc"
                    >
                        <RemoteInput
                            name="tradeCoScc"
                            :title="tips.tradeCoScc"
                            :disabled="disabled"
                            size="small"
                            class="no-left-border"
                            placeholder="18位统一社会信用代码"
                            label-in-value
                            :maxlength="18"
                            valueKey="operatorId"
                            labelKey="coScc"
                            :label="form.tradeCoScc"
                            :displayField="['coScc']"
                            :remoteMethod="handleSearchOperatorScc"
                            @change="handleTradeIdChange($event, 'tradeCoScc')"
                            @get-query-name="v => (form.tradeCoScc = v)"
                        ></RemoteInput>
                    </FormItem>
                </iCol>
                <iCol span="3">
                    <FormItem
                        prop="tradeCode"
                        class="formInput requireBG"
                        :error="tips.tradeCode"
                    >
                        <RemoteInput
                            name="tradeCode"
                            :disabled="disabled"
                            :title="tips.tradeCode"
                            size="small"
                            class="no-left-border"
                            placeholder="10位海关代码"
                            label-in-value
                            :maxlength="10"
                            valueKey="operatorId"
                            labelKey="operatorCode"
                            :displayField="['operatorCode']"
                            :label="form.tradeCode"
                            :remoteMethod="handleSearchOperatorCode"
                            @change="handleTradeIdChange($event, 'tradeCode')"
                            @get-query-name="v => (form.tradeCode = v)"
                        ></RemoteInput>
                    </FormItem>
                </iCol>
                <iCol span="4">
                    <FormItem
                        prop="tradeCiqCode"
                        class="formInput"
                        :error="tips.tradeCiqCode"
                    >
                        <RemoteInput
                            name="tradeCiqCode"
                            :disabled="disabled"
                            :title="tips.tradeCiqCode"
                            size="small"
                            class="no-left-border"
                            placeholder="10位检验检疫代码"
                            label-in-value
                            :maxlength="10"
                            valueKey="operatorId"
                            labelKey="operatorCiq"
                            :displayField="['operatorCiq']"
                            :label="form.tradeCiqCode"
                            :remoteMethod="handleSearchOperatorCiq"
                            @change="
                                handleTradeIdChange($event, 'tradeCiqCode')
                            "
                            @get-query-name="v => (form.tradeCiqCode = v)"
                        ></RemoteInput>
                    </FormItem>
                </iCol>
                <iCol span="9">
                    <FormItem
                        prop="tradeName"
                        class="formInput requireBG"
                        :error="tips.tradeName"
                    >
                        <RemoteInput
                            name="tradeName"
                            :disabled="disabled"
                            :title="tips.tradeName"
                            size="small"
                            class="no-left-border"
                            placeholder="企业名称"
                            :maxlength="60"
                            label-in-value
                            valueKey="operatorId"
                            labelKey="operatorName"
                            :displayField="['operatorName']"
                            :label="form.tradeName"
                            :remoteMethod="handleSearchOperatorName"
                            @change="handleTradeIdChange($event, 'tradeName')"
                            @get-query-name="v => (form.tradeName = v)"
                        ></RemoteInput>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol
                    class="form-label"
                    span="3"
                >{{ isImport ? "境外发" : "境外收" }}货人</iCol>
                <iCol span="12">
                    <FormItem
                        prop="overseasConsignorCode"
                        class="formInput"
                        :error="tips.overseasConsignorCode"
                    >
                        <RemoteInput
                            name="overseasConsignorCode"
                            :disabled="disabled"
                            :title="tips.overseasConsignorCode"
                            size="small"
                            placeholder="境外收货人代码"
                            :maxlength="64"
                            label-in-value
                            valueKey="overseasId"
                            labelKey="overseasCode"
                            :displayField="['overseasCode']"
                            :label="form.overseasConsignorCode"
                            :remoteMethod="handleSearchOverseasCode"
                            @change="
                                handleOverseasChange(
                                    $event,
                                    'overseasConsignorCode'
                                )
                            "
                            @get-query-name="
                                v => (form.overseasConsignorCode = v)
                            "
                        ></RemoteInput>
                    </FormItem>
                </iCol>
                <iCol span="9">
                    <FormItem
                        prop="overseasConsignorEname"
                        class="formInput requireBG"
                        :error="tips.overseasConsignorEname"
                    >
                        <RemoteInput
                            name="overseasConsignorEname"
                            :disabled="disabled"
                            :title="tips.overseasConsignorEname"
                            size="small"
                            placeholder="企业名称（英文）"
                            :maxlength="100"
                            label-in-value
                            valueKey="overseasId"
                            labelKey="overseasName"
                            :displayField="['overseasName']"
                            :label="form.overseasConsignorEname"
                            :remoteMethod="handleSearchOverseasName"
                            @change="
                                handleOverseasChange(
                                    $event,
                                    'overseasConsignorEname'
                                )
                            "
                            @get-query-name="
                                v => (form.overseasConsignorEname = v)
                            "
                        ></RemoteInput>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol
                    class="form-label"
                    span="3"
                >{{ isImport ? "消费使用" : "生产销售" }}单位</iCol>
                <iCol span="5">
                    <FormItem
                        prop="ownerCodeScc"
                        class="formInput requireBG"
                        :error="tips.ownerCodeScc"
                    >
                        <RemoteInput
                            name="ownerCodeScc"
                            :disabled="disabled"
                            :title="tips.ownerCodeScc"
                            size="small"
                            class="no-left-border"
                            placeholder="18位统一社会信用代码"
                            label-in-value
                            :maxlength="18"
                            valueKey="operatorId"
                            labelKey="coScc"
                            :label="form.ownerCodeScc"
                            :displayField="['coScc']"
                            :remoteMethod="handleSearchOwnerScc"
                            @change="
                                handleOwnerIdChange($event, 'ownerCodeScc')
                            "
                            @get-query-name="v => (form.ownerCodeScc = v)"
                        ></RemoteInput>
                    </FormItem>
                </iCol>
                <iCol span="3">
                    <FormItem
                        prop="ownerCode"
                        class="formInput requireBG"
                        :error="tips.ownerCode"
                    >
                        <RemoteInput
                            name="ownerCode"
                            :disabled="disabled"
                            :title="tips.ownerCode"
                            size="small"
                            class="required-input-bg"
                            placeholder="10位海关代码"
                            label-in-value
                            :maxlength="10"
                            valueKey="operatorId"
                            labelKey="operatorCode"
                            :label="form.ownerCode"
                            :displayField="['operatorCode']"
                            :remoteMethod="handleSearchOwnerCode"
                            @change="handleOwnerIdChange($event, 'ownerCode')"
                            @get-query-name="v => (form.ownerCode = v)"
                        ></RemoteInput>
                    </FormItem>
                </iCol>
                <iCol span="4">
                    <FormItem
                        prop="ownerCiqCode"
                        class="formInput"
                        :error="tips.ownerCiqCode"
                    >
                        <RemoteInput
                            name="ownerCiqCode"
                            :disabled="disabled"
                            :title="tips.ownerCiqCode"
                            size="small"
                            class="no-left-border"
                            placeholder="10位检验检疫代码"
                            label-in-value
                            :maxlength="10"
                            valueKey="operatorId"
                            labelKey="operatorCiq"
                            :displayField="['operatorCiq']"
                            :label="form.ownerCiqCode"
                            :remoteMethod="handleSearchOwnerCiq"
                            @change="
                                handleOwnerIdChange($event, 'ownerCiqCode')
                            "
                            @get-query-name="v => (form.ownerCiqCode = v)"
                        ></RemoteInput>
                    </FormItem>
                </iCol>
                <iCol span="9">
                    <FormItem
                        prop="ownerName"
                        class="formInput requireBG"
                        :error="tips.ownerName"
                    >
                        <RemoteInput
                            name="ownerName"
                            :title="tips.ownerName"
                            :disabled="disabled"
                            size="small"
                            class="no-left-border"
                            placeholder="企业名称"
                            :maxlength="60"
                            label-in-value
                            valueKey="operatorId"
                            labelKey="operatorName"
                            :displayField="['operatorName']"
                            :label="form.ownerName"
                            :remoteMethod="handleSearchOwnerName"
                            @change="handleOwnerIdChange($event, 'ownerName')"
                            @get-query-name="v => (form.ownerName = v)"
                        ></RemoteInput>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol class="form-label" span="3">申报单位</iCol>
                <iCol span="5">
                    <FormItem
                        prop="agentCodeScc"
                        class="formInput requireBG"
                        :error="tips.agentCodeScc"
                    >
                        <Input
                            name="agentCodeScc"
                            :disabled="disabled"
                            :title="tips.agentCodeScc"
                            placeholder="18位统一社会信用代码"
                            v-model="form.agentCodeScc"
                            :maxlength="18"
                        />
                    </FormItem>
                </iCol>
                <iCol span="3">
                    <FormItem
                        prop="agentCode"
                        class="formInput requireBG"
                        :error="tips.agentCode"
                    >
                        <Input
                            name="agentCode"
                            :disabled="disabled"
                            :title="tips.agentCode"
                            placeholder="10位海关代码"
                            v-model="form.agentCode"
                            :maxlength="10"
                        />
                    </FormItem>
                </iCol>
                <iCol span="4">
                    <FormItem
                        prop="declCiqCode"
                        class="formInput"
                        :error="tips.declCiqCode"
                    >
                        <Input
                            name="declCiqCode"
                            :disabled="disabled"
                            :title="tips.declCiqCode"
                            placeholder="10位检验检疫代码"
                            v-model="form.declCiqCode"
                            :maxlength="10"
                        />
                    </FormItem>
                </iCol>
                <iCol span="9">
                    <FormItem
                        prop="agentName"
                        class="formInput requireBG"
                        :error="tips.agentName"
                    >
                        <Input
                            name="agentName"
                            :disabled="disabled"
                            :title="tips.agentName"
                            placeholder="企业名称"
                            v-model="form.agentName"
                        />
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol class="form-label" span="3">运输方式</iCol>
                <iCol span="5">
                    <FormItem
                        prop="trafMode"
                        class="formInput requireBG"
                        :error="tips.trafMode"
                    >
                        <RemoteSearch
                            name="trafMode"
                            :disabled="disabled"
                            :title="tips.trafMode"
                            v-model="form.trafMode"
                            :keyword="form.trafModeName"
                            :list="trafModeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                            :secondLabels="['dataSecondType', 'dataThirdType']"
                            @on-get-name="
                                name => {
                                    form.trafModeName = name;
                                }
                            "
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="3">运输工具名称</iCol>
                <iCol span="4">
                    <FormItem
                        prop="trafName"
                        class="formInput"
                        :error="tips.trafName"
                    >
                        <Input
                            name="trafName"
                            :disabled="disabled"
                            :maxlength="32"
                            v-model="form.trafName"
                            :title="tips.trafName"
                        ></Input>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="2">航次号</iCol>
                <iCol span="7">
                    <FormItem
                        prop="voyageNo"
                        class="formInput"
                        :error="tips.voyageNo"
                    >
                        <Input
                            name="voyageNo"
                            :disabled="disabled"
                            :maxlength="32"
                            v-model="form.voyageNo"
                            :title="tips.voyageNo"
                        ></Input>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol class="form-label" span="3">提运单号</iCol>
                <iCol span="5">
                    <FormItem
                        prop="billNo"
                        class="formInput"
                        :error="tips.billNo"
                    >
                        <Input
                            name="billNo"
                            :disabled="disabled"
                            :maxlength="32"
                            v-model="form.billNo"
                            :title="tips.billNo"
                        ></Input>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="3">监管方式</iCol>
                <iCol span="4">
                    <FormItem
                        prop="tradeMode"
                        class="formInput requireBG"
                        :error="tips.tradeMode"
                    >
                        <RemoteSearch
                            name="tradeMode"
                            :disabled="disabled"
                            :title="tips.tradeMode"
                            v-model="form.tradeMode"
                            :keyword="form.tradeModeName"
                            :list="tradeModeList"
                            :dropdownWidth="240"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                            :secondLabels="['dataSecondType', 'dataThirdType']"
                            @on-get-name="
                                name => {
                                    form.tradeModeName = name;
                                }
                            "
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="2">征免性质</iCol>
                <iCol span="7">
                    <FormItem
                        prop="cutMode"
                        class="formInput"
                        :error="tips.cutMode"
                    >
                        <RemoteSearch
                            name="cutMode"
                            :disabled="disabled"
                            :title="tips.cutMode"
                            v-model="form.cutMode"
                            :keyword="form.cutModeName"
                            :list="cutModeList"
                            keywordFiled="shortName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'shortName']"
                            @on-get-name="
                                name => {
                                    form.cutModeName = name;
                                }
                            "
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol class="form-label" span="3">许可证号</iCol>
                <iCol span="4">
                    <FormItem
                        prop="licenseNo"
                        class="formInput"
                        :error="tips.licenseNo"
                    >
                        <Input
                            name="licenseNo"
                            :disabled="disabled"
                            :maxlength="20"
                            v-model="form.licenseNo"
                            :title="tips.licenseNo"
                            @on-blur="fmtLicenseNo"
                        ></Input>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="2">{{
                    isImport ? "启运国" : "运抵国"
                }}</iCol>
                <iCol span="4">
                    <FormItem
                        prop="tradeCountry"
                        class="formInput requireBG"
                        :error="tips.tradeCountry"
                    >
                        <RemoteSearch
                            name="tradeCountry"
                            :disabled="disabled"
                            :title="tips.tradeCountry"
                            v-model="form.tradeCountry"
                            :keyword="form.tradeCountryName"
                            :list="countryRegionList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                            :secondLabels="['dataSecondType', 'dataThirdType']"
                            @on-get-name="
                                name => {
                                    form.tradeCountryName = name;
                                }
                            "
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <iCol
                    class="form-label"
                    span="2"
                >{{ isImport ? "经停" : "指运" }}港</iCol>
                <iCol span="4">
                    <FormItem
                        prop="distinatePort"
                        class="formInput requireBG"
                        :error="tips.distinatePort"
                    >
                        <RemoteSearch
                            name="distinatePort"
                            :disabled="disabled"
                            :title="tips.distinatePort"
                            v-model="form.distinatePort"
                            :keyword="form.distinatePortName"
                            :list="distinatePortList"
                            :dropdownWidth="240"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                            :secondLabels="['dataSecondType', 'dataThirdType']"
                            @on-get-name="
                                name => {
                                    form.distinatePortName = name;
                                }
                            "
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="2">成交方式</iCol>
                <iCol span="3">
                    <FormItem
                        prop="transMode"
                        class="formInput requireBG"
                        :error="tips.transMode"
                    >
                        <RemoteSearch
                            name="transMode"
                            :disabled="disabled"
                            :title="tips.transMode"
                            v-model="form.transMode"
                            :keyword="form.transModeName"
                            :list="transModeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                            @on-get-name="
                                name => {
                                    form.transModeName = name;
                                }
                            "
                            @on-enter="transModeEnter"
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol class="form-label" span="3">运费</iCol>
                <iCol span="1">
                    <FormItem
                        prop="feeMark"
                        :class="{ requireBG: feeMarkRequired }"
                        class="formInput"
                        :error="tips.feeMark"
                    >
                        <RemoteSearch
                            name="feeMark"
                            :disabled="disabled || feeDisabled"
                            :title="tips.feeMark"
                            v-model="form.feeMark"
                            :dropdownWidth="100"
                            :list="feeMarkList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <!-- 运费/率（当标记为率的时候，不需要选择币制，且运费为1-99.99）-->
                <iCol span="2">
                    <FormItem
                        prop="feeRate"
                        class="formInput"
                        :error="tips.feeRate"
                    >
                        <Input
                            name="feeRate"
                            class="no-left-border"
                            :disabled="disabled || feeDisabled"
                            v-model="form.feeRate"
                            :title="tips.feeRate"
                            :maxlength="17"
                        ></Input>
                    </FormItem>
                </iCol>
                <iCol span="1">
                    <!-- 运费币制 -->
                    <FormItem
                        prop="feeCurr"
                        class="formInput input-pr-10 close-btn-r0"
                        :error="tips.feeCurr"
                    >
                        <RemoteSearch
                            name="feeCurr"
                            :disabled="
                                disabled || feeDisabled || form.feeMark == 1
                            "
                            :title="tips.feeCurr"
                            v-model="form.feeCurr"
                            keyword
                            :dropdownWidth="200"
                            :list="currencyCodeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                            :secondLabels="['dataSecondType', 'dataThirdType']"
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="2">保险费</iCol>
                <iCol span="1">
                    <FormItem
                        prop="insurMark"
                        class="formInput"
                        :class="{ requireBG: insurMarkRequird }"
                        :error="tips.insurMark"
                    >
                        <!-- 保险费标记（1：率，3：总价） -->
                        <RemoteSearch
                            name="insurMark"
                            :disabled="disabled || insurDisabled"
                            :title="tips.insurMark"
                            v-model="form.insurMark"
                            keyword
                            :dropdownWidth="100"
                            :list="insurMarkList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <iCol span="2">
                    <FormItem
                        prop="insurRate"
                        class="formInput"
                        :error="tips.insurRate"
                    >
                        <!-- 保险费／率 -->
                        <Input
                            name="insurRate"
                            class="no-left-border"
                            :disabled="disabled || insurDisabled"
                            v-model="form.insurRate"
                            :title="tips.insurRate"
                            :maxlength="17"
                        ></Input>
                    </FormItem>
                </iCol>
                <iCol span="1">
                    <FormItem
                        prop="insurCurr"
                        class="formInput input-pr-10 close-btn-r0"
                        :error="tips.insurCurr"
                    >
                        <!-- 保险费币制 -->
                        <RemoteSearch
                            name="insurCurr"
                            :disabled="
                                disabled || insurDisabled || form.insurMark == 1
                            "
                            :title="tips.insurCurr"
                            v-model="form.insurCurr"
                            keyword
                            :dropdownWidth="200"
                            :list="currencyCodeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                            :secondLabels="['dataSecondType', 'dataThirdType']"
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <!-- 杂费标记（1：率，3：总价） -->
                <iCol class="form-label" span="2">杂费</iCol>
                <iCol span="1">
                    <FormItem
                        prop="otherMark"
                        class="formInput"
                        :error="tips.otherMark"
                    >
                        <RemoteSearch
                            name="otherMark"
                            :disabled="disabled"
                            :title="tips.otherMark"
                            v-model="form.otherMark"
                            keyword
                            :dropdownWidth="100"
                            :list="insurMarkList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <iCol span="2">
                    <FormItem
                        prop="otherRate"
                        class="formInput"
                        :error="tips.otherRate"
                    >
                        <!-- 杂费／率 -->
                        <Input
                            name="otherRate"
                            class="no-left-border"
                            :disabled="disabled"
                            v-model="form.otherRate"
                            :title="tips.otherRate"
                        ></Input>
                    </FormItem>
                </iCol>
                <iCol span="1">
                    <FormItem
                        prop="otherCurr"
                        class="formInput input-pr-10 close-btn-r0"
                        :error="tips.otherCurr"
                    >
                        <!-- 杂费币制 -->
                        <RemoteSearch
                            name="otherCurr"
                            :disabled="disabled || form.otherMark == 1"
                            :title="tips.otherCurr"
                            v-model="form.otherCurr"
                            keyword
                            :dropdownWidth="200"
                            :list="currencyCodeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :secondLabels="['dataSecondType', 'dataThirdType']"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="2">件数</iCol>
                <iCol span="3">
                    <FormItem
                        prop="packNo"
                        class="formInput requireBG"
                        :error="tips.packNo"
                    >
                        <Input
                            name="packNo"
                            :disabled="disabled"
                            v-model.trim="form.packNo"
                            :maxlength="9"
                            :title="tips.packNo"
                        ></Input>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol class="form-label" span="3">包装种类</iCol>
                <iCol span="7">
                    <FormItem
                        prop="wrapType"
                        class="formInput requireBG"
                        :error="tips.wrapType"
                    >
                        <RemoteSearch
                            name="wrapType"
                            :disabled="disabled"
                            :title="tips.wrapType"
                            v-model="form.wrapType"
                            keyword
                            :list="wrapTypeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                            :secondLabels="['dataSecondType', 'dataThirdType']"
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <iCol span="3">
                    <Button
                        type="primary"
                        @click="openOtherPacking"
                    >其他包装</Button>
                </iCol>
                <iCol class="form-label" span="2">毛重(KG)</iCol>
                <iCol span="4">
                    <FormItem
                        prop="grossWet"
                        class="formInput requireBG"
                        :error="tips.grossWet"
                    >
                        <Input
                            name="grossWet"
                            :disabled="disabled"
                            :maxlength="20"
                            :title="tips.grossWet"
                            v-model="form.grossWet"
                        ></Input>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="2">净重(KG)</iCol>
                <iCol span="3">
                    <FormItem
                        prop="netWt"
                        class="formInput requireBG"
                        :error="tips.netWt"
                    >
                        <Input
                            name="netWt"
                            :disabled="disabled"
                            v-model="form.netWt"
                            :title="tips.netWt"
                            :maxlength="20"
                        ></Input>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol class="form-label" span="3">贸易国别</iCol>
                <iCol span="4">
                    <FormItem
                        prop="tradeCountryNo"
                        class="formInput requireBG"
                        :error="tips.tradeCountryNo"
                    >
                        <RemoteSearch
                            name="tradeCountryNo"
                            :disabled="disabled"
                            :title="tips.tradeCountryNo"
                            v-model="form.tradeCountryNo"
                            :keyword="form.tradeCountryNoName"
                            :list="countryRegionList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                            :secondLabels="['dataSecondType', 'dataThirdType']"
                            @on-get-name="
                                name => {
                                    form.tradeCountryNoName = name;
                                }
                            "
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="3">集装箱数</iCol>
                <iCol span="3">
                    <FormItem prop="cntCount" class="formInput">
                        <Input disabled v-model="form.cntCount" name="cntCount"></Input>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="2">随附单证</iCol>
                <iCol span="9">
                    <FormItem
                        prop="attachedEdoc"
                        class="formInput"
                    >
                        <Input disabled v-model="form.attachedEdoc" name="attachedEdoc"></Input>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <iCol
                    class="form-label"
                    span="3"
                >{{ isImport ? "入" : "离" }}境口岸</iCol>
                <iCol span="4">
                    <FormItem
                        prop="entyPortCode"
                        class="formInput requireBG"
                        :error="tips.entyPortCode"
                    >
                        <RemoteSearch
                            name="entyPortCode"
                            :disabled="disabled"
                            :title="tips.entyPortCode"
                            v-model="form.entyPortCode"
                            :keyword="form.entyPortName"
                            :list="entyPortCodeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                            @on-get-name="
                                name => {
                                    form.entyPortName = name;
                                }
                            "
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
                <iCol class="form-label" span="3">货物存放地点</iCol>
                <iCol :span="isImport ? 3 : 8">
                    <FormItem
                        prop="goodsPlace"
                        class="formInput"
                        :class="{ requireBG: isImport }"
                        :error="tips.goodsPlace"
                    >
                        <Input
                            name="goodsPlace"
                            :disabled="disabled"
                            :maxlength="100"
                            :title="tips.goodsPlace"
                            v-model="form.goodsPlace"
                        ></Input>
                    </FormItem>
                </iCol>
                <template v-if="isImport">
                    <iCol class="form-label" span="2">启运港</iCol>
                    <iCol span="3">
                        <FormItem
                            prop="despPortCode"
                            class="formInput requireBG"
                            :error="tips.despPortCode"
                        >
                            <RemoteSearch
                                name="despPortCode"
                                :disabled="disabled"
                                :title="tips.despPortCode"
                                v-model="form.despPortCode"
                                :keyword="form.despPortName"
                                :list="distinatePortList"
                                keywordFiled="dataName"
                                valueField="dataCode"
                                :labelFieldList="['dataCode', 'dataName']"
                                :secondLabels="[
                                    'dataSecondType',
                                    'dataThirdType'
                                ]"
                                @on-get-name="
                                    name => {
                                        form.despPortName = name;
                                    }
                                "
                            ></RemoteSearch>
                        </FormItem>
                    </iCol>
                </template>
                <iCol class="form-label" span="3">报关单类型</iCol>
                <iCol span="3">
                    <FormItem
                        prop="entryType"
                        class="formInput requireBG"
                        :error="tips.entryType"
                    >
                        <RemoteSearch
                            name="entryType"
                            :disabled="disabled"
                            :title="tips.entryType"
                            v-model="form.entryType"
                            keyword
                            :list="entryTypeList"
                            keywordFiled="dataName"
                            valueField="dataCode"
                            :labelFieldList="['dataCode', 'dataName']"
                        ></RemoteSearch>
                    </FormItem>
                </iCol>
            </Row>
            <Row>
                <template v-if="isBorder">
                    <iCol class="form-label" span="3">清单类型</iCol>
                    <iCol span="4">
                        <FormItem
                            prop="billType"
                            class="formInput requireBG"
                            :error="tips.billType"
                        >
                            <RemoteSearch
                                name="billType"
                                :disabled="disabled"
                                :title="tips.billType"
                                v-model="form.billType"
                                :list="billTypeList"
                                keywordFiled="dataName"
                                valueField="dataCode"
                                :labelFieldList="['dataCode', 'dataName']"
                            ></RemoteSearch>
                        </FormItem>
                    </iCol>
                </template>
                <iCol class="form-label" span="3">备注</iCol>
                <iCol :span="isBorder ? 9 : 16">
                    <FormItem
                        prop="notes"
                        class="formInput"
                        :error="tips.notes"
                    >
                        <Input
                            name="notes"
                            :disabled="disabled"
                            class="bytes-tips"
                            :maxlength="255"
                            v-model="form.notes"
                            :title="tips.notes"
                            @on-blur="fmtNotes"
                        >
                        <div slot="suffix">
                            ({{ notesLen > 255 ? 255 : notesLen }}字节)
                        </div>
                        </Input>
                    </FormItem>
                </iCol>
                <iCol span="1">
                    <Button class="morebtn" type="primary" @click="openRemark">
                        <i class="icon iconfont icon-more"></i>
                    </Button>
                </iCol>
                <iCol span="4">
                    <Button
                        type="primary"
                        @click="openOtherMatter"
                    >其他事项确认</Button>
                </iCol>
            </Row>
            <Row :class="{ 'border-bottom': !mainshow }">
                <iCol :span="1">
                    <!-- 展开收起 -->
                    <Button
                        @click="mainshow = !mainshow"
                        style="margin-left: 9px;"
                        class="morebtn"
                        type="primary"
                    >
                        <i
                            class="icon iconfont"
                            :class="mainshow ? 'icon-xia' : 'icon-shang'"
                        ></i>
                    </Button>
                </iCol>
                <iCol
                    class="form-label"
                    :span="2"
                >标记唛码</iCol>
                <iCol :span="16">
                    <FormItem
                        prop="markNo"
                        class="formInput requireBG"
                        :error="tips.markNo"
                    >
                        <Input
                            name="markNo"
                            :disabled="disabled"
                            class="bytes-tips"
                            :maxlength="400"
                            :title="tips.markNo"
                            v-model="form.markNo"
                            @on-enter="handleMarkNoEnter"
                            @on-blur="fmtMarkNo"
                        >
                        <div slot="suffix">
                            ({{ markNoLen > 400 ? 400 : markNoLen }}字节)
                        </div>
                        </Input>
                    </FormItem>
                </iCol>
                <iCol span="1">
                    <Button
                        class="morebtn"
                        type="primary"
                        @click="openMarkerCode"
                    >
                        <i class="icon iconfont icon-more"></i>
                    </Button>
                </iCol>
                <iCol span="4">
                    <Button
                        type="primary"
                        @click="openBusMatter"
                    >业务事项</Button>
                </iCol>
            </Row>
            <Row v-show="mainshow">
                <iCol span="24">
                    <Row>
                        <iCol
                            class="form-label"
                            span="4"
                        >检验检疫受理机关</iCol>
                        <iCol :span="isImport ? 11 : 8">
                            <FormItem
                                prop="orgCode"
                                class="formInput requireBG"
                                :error="tips.orgCode"
                            >
                                <RemoteSearch
                                    name="orgCode"
                                    :disabled="disabled"
                                    :title="tips.orgCode"
                                    v-model="form.orgCode"
                                    :keyword="form.orgCodeName"
                                    :list="orgCodeList"
                                    keywordFiled="dataName"
                                    valueField="dataCode"
                                    :labelFieldList="['dataCode', 'dataName']"
                                    @on-get-name="
                                        name => {
                                            form.orgCodeName = name;
                                        }
                                    "
                                ></RemoteSearch>
                            </FormItem>
                        </iCol>
                        <iCol class="form-label" :span="isImport ? 2 : 4">企业资质</iCol>
                        <iCol span="1">
                            <FormItem
                                prop="entQualifTypeCode"
                                class="formInput"
                            >
                                <Input
                                    disabled
                                    v-model="form.entQualifTypeCode"
                                ></Input>
                            </FormItem>
                        </iCol>
                        <iCol :span="isImport ? 4 : 5">
                            <FormItem
                                prop="entQualifTypeName"
                                class="formInput"
                            >
                                <Input
                                    disabled
                                    class="no-left-border"
                                    v-model="form.entQualifTypeName"
                                ></Input>
                            </FormItem>
                        </iCol>
                        <iCol span="2" style="text-align:center;">
                            <Button
                                class="morebtn"
                                type="primary"
                                @click="toggleEnterpriseQua('prev')"
                            >
                                <i class="icon iconfont icon-zuo"></i>
                            </Button>
                            <Button
                                class="morebtn"
                                style="margin-left: 2px;"
                                type="primary"
                                @click="toggleEnterpriseQua('next')"
                            >
                                <i class="icon iconfont icon-gengduo"></i>
                            </Button>
                            <Button
                                style="margin-left: 2px;"
                                class="morebtn"
                                type="primary"
                                @click="openPriseQua"
                            >
                                <i class="icon iconfont icon-more"></i>
                            </Button>
                        </iCol>
                    </Row>
                    <Row>
                        <iCol class="form-label" span="4">领证机关</iCol>
                        <iCol :span="isImport ? 4 : 8">
                            <FormItem
                                prop="vsaOrgCode"
                                class="formInput requireBG"
                                :error="tips.vsaOrgCode"
                            >
                                <RemoteSearch
                                    name="vsaOrgCode"
                                    :disabled="disabled"
                                    :title="tips.vsaOrgCode"
                                    v-model="form.vsaOrgCode"
                                    :keyword="form.vsaOrgCodeName"
                                    :list="orgCodeList"
                                    keywordFiled="dataName"
                                    valueField="dataCode"
                                    :labelFieldList="['dataCode', 'dataName']"
                                    @on-get-name="
                                        name => {
                                            form.vsaOrgCodeName = name;
                                        }
                                    "
                                ></RemoteSearch>
                            </FormItem>
                        </iCol>
                        <iCol
                            class="form-label"
                            span="4"
                        >口岸检验检疫机关</iCol>
                        <iCol :span="isImport ? 3 : 8">
                            <FormItem
                                prop="inspOrgCode"
                                class="formInput requireBG"
                                :error="tips.inspOrgCode"
                            >
                                <RemoteSearch
                                    name="inspOrgCode"
                                    :disabled="disabled"
                                    :title="tips.inspOrgCode"
                                    v-model="form.inspOrgCode"
                                    :keyword="form.inspOrgCodeName"
                                    :list="orgCodeList"
                                    keywordFiled="dataName"
                                    valueField="dataCode"
                                    :labelFieldList="['dataCode', 'dataName']"
                                    @on-get-name="
                                        name => {
                                            form.inspOrgCodeName = name;
                                        }
                                    "
                                ></RemoteSearch>
                            </FormItem>
                        </iCol>
                        <template v-if="isImport">
                            <iCol class="form-label" span="2">启运日期</iCol>
                            <iCol span="3">
                                <FormItem
                                    prop="despDate"
                                    class="requireBG alldata despDate"
                                    :error="tips.despDate"
                                >
                                    <DatePicker
                                        :disabled="disabled"
                                        :editable="false"
                                        type="date"
                                        :value="form.despDate"
                                        :title="tips.despDate"
                                        @on-change="
                                            handleDateChange($event, 'despDate')
                                        "
                                    ></DatePicker>
                                </FormItem>
                            </iCol>
                            <iCol class="form-label" span="2">B/L号</iCol>
                            <iCol span="2">
                                <FormItem
                                    prop="ciqBillNo"
                                    class="formInput"
                                >
                                    <Input
                                        name="ciqBillNo"
                                        :disabled="disabled"
                                        :maxlength="400"
                                        v-model="form.ciqBillNo"
                                    ></Input>
                                </FormItem>
                            </iCol>
                        </template>
                    </Row>
                    <Row>
                        <iCol class="form-label" span="4">目的地检疫机关</iCol>
                        <iCol :span="isImport ? 4 : 8">
                            <FormItem
                                prop="purpOrgCode"
                                class="formInput requireBG"
                                :error="tips.purpOrgCode"
                            >
                                <RemoteSearch
                                    name="purpOrgCode"
                                    :disabled="disabled"
                                    :title="tips.purpOrgCode"
                                    v-model="form.purpOrgCode"
                                    :keyword="form.purpOrgCodeName"
                                    :list="orgCodeList"
                                    keywordFiled="dataName"
                                    valueField="dataCode"
                                    :labelFieldList="['dataCode', 'dataName']"
                                    @on-get-name="
                                        name => {
                                            form.purpOrgCodeName = name;
                                        }
                                    "
                                ></RemoteSearch>
                            </FormItem>
                        </iCol>
                        <iCol class="form-label" span="4">关联号码及理由</iCol>
                        <iCol :span="isImport ? 5 : 4">
                            <FormItem
                                prop="correlationDeclNo"
                                class="formInput"
                                :error="tips.correlationDeclNo"
                            >
                                <Input
                                    name="correlationDeclNo"
                                    placeholder="关联号码"
                                    :disabled="disabled"
                                    v-model="form.correlationDeclNo"
                                    :maxlength="18"
                                    :title="tips.correlationDeclNo"
                                ></Input>
                            </FormItem>
                        </iCol>
                        <iCol :span="isImport ? 5 : 4">
                            <FormItem
                                prop="correlationReasonFlagName"
                                class="formInput"
                                :error="tips.correlationReasonFlagName"
                            >
                                <Input
                                    name="correlationReasonFlagName"
                                    class="no-left-border"
                                    placeholder="关联理由"
                                    :disabled="disabled"
                                    :maxlength="20"
                                    v-model="form.correlationReasonFlagName"
                                    :title="tips.correlationReasonFlagName"
                                ></Input>
                            </FormItem>
                        </iCol>
                        <iCol span="2" v-if="isImport">
                            <Button
                                type="primary"
                                @click="openUsePeop"
                            >使用人</Button>
                        </iCol>
                    </Row>
                    <Row>
                        <template v-if="isImport">
                            <iCol class="form-label" span="4">原箱运输</iCol>
                            <iCol span="4">
                                <FormItem
                                    prop="origBoxFlagName"
                                    class="formInput"
                                    :error="tips.origBoxFlagName"
                                >
                                    <RemoteSearch
                                        name="origBoxFlagName"
                                        :disabled="disabled"
                                        :title="tips.origBoxFlagName"
                                        v-model="form.origBoxFlagName"
                                        :list="booleanList"
                                        keywordFiled="dataName"
                                        valueField="dataCode"
                                        :labelFieldList="[
                                            'dataCode',
                                            'dataName'
                                        ]"
                                    ></RemoteSearch>
                                </FormItem>
                            </iCol>
                        </template>
                        <iCol class="form-label" span="4">特殊业务标识</iCol>
                        <iCol :span="isImport ? 2 : 8">
                            <FormItem
                                prop="specDeclFlag"
                                class="formInput"
                            >
                                <Input
                                    disabled
                                    name="specDeclFlag"
                                    v-model="form.specDeclFlagName"
                                ></Input>
                            </FormItem>
                        </iCol>
                        <!-- 特殊业务标识 -->
                        <iCol class="morecenter" span="1">
                            <Button
                                class="morebtn"
                                type="primary"
                                @click="openSpecialIden"
                            >
                                <i class="icon iconfont icon-more"></i>
                            </Button>
                        </iCol>
                        <iCol class="form-label" :span="isImport ? 2 : 3">所需单证</iCol>
                        <iCol :span="isImport ? 3 : 4">
                            <FormItem prop="requestCert" class="formInput">
                                <Input
                                    disabled
                                    v-model="form.appCertName"
                                ></Input>
                            </FormItem>
                        </iCol>
                        <iCol span="4">
                            <Button
                                type="primary"
                                @click="openDeclareEle"
                            >检验检疫签证申报要素</Button>
                        </iCol>
                    </Row>
                </iCol>
            </Row>
        </Form>
        <!--其他包装-->
        <div v-if="modalParams.packingShow">
            <packingModal
                v-model="modalParams.packingShow"
                @setOtherWrapData="setOtherWrapData"
                :packingModal="modalParams.packingParams"
            />
        </div>
        <!--备注-->
        <div v-if="modalParams.remarkShow">
            <remarkModal
                @saveRemark="saveRemark"
                v-model="modalParams.remarkShow"
                :remarkObj="modalParams.remarkParams"
            />
        </div>
        <!-- 其他事项弹窗 -->
        <div v-if="modalParams.otherMatterShow">
            <otherMatterModal
                v-model="modalParams.otherMatterShow"
                @saveOtherMatter="saveOtherMatter"
                :otherMatter="modalParams.otherMatterParams"
            />
        </div>
        <!-- 标记唛码 -->
        <div v-if="modalParams.markerCodeShow">
            <markerCodeModal
                @saveMarkerCode="saveMarkerCode"
                v-model="modalParams.markerCodeShow"
                :markerCodeParams="modalParams.markerCodeParams"
            />
        </div>
        <!-- 业务事项弹窗 -->
        <div v-if="modalParams.busMatterShow">
            <busMatterModal
                v-model="modalParams.busMatterShow"
                @saveBusMatter="saveBusMatter"
                :busMatter="modalParams.busMatterParams"
            />
        </div>
        <!-- 特殊业务标识 -->
        <div v-if="modalParams.specialIdenShow">
            <specialIdenModal
                v-model="modalParams.specialIdenShow"
                @saveSpecialIden="saveSpecialIden"
                :specialIden="modalParams.specialIdenParams"
            />
        </div>
        <!-- 检验检疫申报要素 -->
        <div v-if="modalParams.CIQdeclareEleShow">
            <CIQdeclareEleModal
                v-model="modalParams.CIQdeclareEleShow"
                @saveCIQdeclareEle="saveCIQdeclareEle"
                :CIQdeclareEle="modalParams.CIQdeclareEleParams"
            />
        </div>
        <!-- 企业资质 -->
        <div v-if="modalParams.qualificationsShow">
            <qualificationsModal
                v-model="modalParams.qualificationsShow"
                @saveEnterpriseQua="savePriseQua"
                :qualifications="modalParams.qualificationsParams"
            />
        </div>
        <!-- 使用人 -->
        <div v-if="modalParams.usePeopModalShow">
            <usePeopModal
                v-model="modalParams.usePeopModalShow"
                @saveUsePeop="saveUsePeop"
                :usePeopModal="modalParams.usePeopModalParams"
            />
        </div>
    </div>
</template>
<script>
import RemoteSearch from '@/view/components/RemoteSearch'

import { formRules, formMethods } from '@/mixins/form/form'
import eventMixin from '@/mixins/form/event'
import watchMixin from '@/mixins/form/watch'
import baseMixin from './mixins/base'
import modalMixin from './mixins/modal'
import handleDataMixin from './mixins/handleData'
import { tradeRemote, overseasRemote, ownerRemote } from './mixins/remote'

export default {
    mixins: [
        baseMixin,
        eventMixin,
        watchMixin,
        formRules,
        formMethods,
        tradeRemote,
        overseasRemote,
        ownerRemote,
        handleDataMixin,
        modalMixin
    ],
    props: {
        // 进口还是出口 (默认进口)
        isImport: {
            type: Boolean,
            default: true
        },
        // 判断是进出口还是进出境（默认进出境)
        isBorder: {
            type: Boolean,
            default: true
        },
        disabled: {
            type: Boolean,
            default: false
        },
        custIdList: {
            type: Array,
            default: () => []
        },
        customsCodeList: {
            type: Array,
            default: () => []
        },
        agentCodeList: {
            type: Array,
            default: () => []
        },
        trafModeList: {
            type: Array,
            default: () => []
        },
        cutModeList: {
            type: Array,
            default: () => []
        },
        countryRegionList: {
            type: Array,
            default: () => []
        },
        distinatePortList: {
            type: Array,
            default: () => []
        },
        transModeList: {
            type: Array,
            default: () => []
        },
        tradeModeList: {
            type: Array,
            default: () => []
        },
        feeMarkList: {
            type: Array,
            default: () => []
        },
        currencyCodeList: {
            type: Array,
            default: () => []
        },
        insurMarkList: {
            type: Array,
            default: () => []
        },
        entyPortCodeList: {
            type: Array,
            default: () => []
        },
        entryTypeList: {
            type: Array,
            default: () => []
        },
        wrapTypeList: {
            type: Array,
            default: () => []
        },
        billTypeList: {
            type: Array,
            default: () => []
        },
        orgCodeList: {
            type: Array,
            default: () => []
        },
        booleanList: {
            type: Array,
            default: () => []
        }
    },
    components: {
        RemoteSearch
    },
    data () {
        return {
            mainshow: false,
            // ***报关报检表
            form: {
                ieFlag: 'I', // 进出口别
                agentCode: '', // 申报单位代码 ,
                agentCodeScc: '', // 申报单位统一代码 ,
                agentName: '', // 申报单位名称 ,
                appCertName: '', // 所需单证 ,
                attachedEdoc: '', // 随附单证
                billNo: '', // 提运单号 ,
                billType: '', // 备案清单类型(进境or出境填1，其他为空) ,
                businessStatus: '', // 订单状态 ,
                businessStatusName: '',
                chkSurety: '', // 担保验放:1:是；0否 ,
                ciqBillNo: '', // b/l号 ,
                cntCount: '', // 集装箱数 ,
                companyId: '', // 公司id ,
                contrNo: '', // 合同号 ,
                correlationDeclNo: '', // 关联号码 ,
                correlationReasonFlagName: '', // 关联理由 ,
                custId: '', // 客户id ,
                custName: '', // 客户名称 ,
                cutMode: '', // 征免性质 ,
                cutModeName: '', // 征免性质 ,
                declCiqCode: '', // 申报单位检验检疫编码 ,
                declPort: '', // 申报口岸 ,
                declPortName: '',
                declareDate: '', // 申报日期 ,
                declareId: '', // 报关主键 ,
                declareNo: '', // 内部编号 ,
                despDate: '', // 启运日期格式为：yyyymmdd ,
                despPortCode: '', // 启运港代码 ,
                despPortName: '', // 启运港代码 ,
                distinatePort: '', // 经停港/指运港 ,
                distinatePortName: '',
                ediSendStatus: '', // 发单一窗口状态 ,
                entQualifTypeCode: '', // 企业资质类别代码 ,
                entQualifTypeName: '',
                entryId: '', // 报关单号 ,
                entryType: 'M', // 报关单类型 ,
                entyPortCode: '', // 入境口岸或离境口岸代码 ,
                entyPortName: '',
                feeMark: '', // 运费标记（1：率，2：单价，3：总价） ,
                feeCurr: '', // 运费币制 , //
                feeRate: '', // 运费／率 ,
                freightPaymentMethods: '', // 运费支付方法 ,
                goodsPlace: '', // 货物存放地点 ,
                grossWet: '', // 毛重 ,
                ieDate: '', // 进出口日期 ,
                iePort: '', // 进出境关别 ,
                iePortName: '',
                inspOrgCode: '', // 口岸检验检疫机关代码 ,
                inspOrgCodeName: '', // 口岸检验检疫机关 ,
                insurCurr: '', // 保险费币制 ,
                insurMark: '', // 保险费标记（1：率，3：总价） ,
                insurRate: '', // 保险费／率 ,
                licenseNo: '', // 许可证编号 ,
                manualNo: '', // 备案号 ,
                markNo: 'N/M', // 标记唛码 ,
                netWt: '', // 净重 ,
                notes: '', // 备注 ,
                orgCode: '', // 检验检疫受理机关代码 ,
                orgCodeName: '', // 检验检疫受理机关 ,
                otherCurr: '', // 杂费币制 ,
                otherMark: '', // 杂费标记（1：率，3：总价） ,
                otherRate: '', // 杂费／率 ,
                otherWrap: '', // 其他包装 ,
                overseasConsignorCode: '', // 境外收发货人代码 ,
                overseasConsignorEname: '', // 境外发货人名称 ,
                ownerCiqCode: '', // 消费单位检验检疫编码 ,
                ownerCode: '', // 消费单位代码 ,
                ownerCodeScc: '', // 消费单位统一代码 ,
                ownerName: '', // 消费单位名称 ,
                packNo: '', // 件数 ,
                paperlessTax: '', // 税单无纸化（0：空，1：✔） ,
                paymentConfirmed: '', // 支付特许权使用费确认（0：否，1：是，9：空） ,
                preEntryId: '', // 预录入编号
                pricesConfirmed: '', // 价格影响确认（0：否，1：是，9：空） ,
                purpOrgCode: '', // 目的地检验检疫机关代码 ,
                purpOrgCodeName: '', // 目的地检验检疫机关 ,
                requestCert: '', // 所需单证 ,
                seqNo: '', // 统一编号 ,
                sinceNewspaperPay: '', // 自报自缴（0：空，1：✔） ,
                specDeclFlag: '', // 特殊业务标识 ,
                specDeclFlagName: '', // 特殊业务标识（中文） ,
                specialRelaConfirmed: '', // 特殊关系确认（0：否，1：是，9：空） ,
                tradeCiqCode: '', // 境内收发货人检验检疫编码 ,
                tradeCoScc: '', // 境内收发货人统一代码 ,
                tradeCode: '', // 境内收发货人代码 ,
                tradeCountry: '', // 启运国/运抵国 ,
                tradeCountryName: '', // 启运国/运抵国 ,
                tradeCountryNo: '', // 贸易国别 使用3位国籍参数表 ,
                tradeCountryNoName: '', // 贸易国别 使用3位国籍参数表 ,
                tradeMode: '', // 监管方式 ,
                tradeModeName: '', // 监管方式 ,
                tradeName: '', // 境内收发货人名称 ,
                trafMode: '', // 运输方式 ,
                trafModeName: '', // 运输方式 ,
                trafName: '', // 运输工具(imo) ,
                transMode: '', // 成交方式 ,
                transModeName: '', // 成交方式 ,
                voluntaryTaxation: '', // 自主报税（0：空，1：✔） ,
                voyageNo: '', // 航次 ,
                vsaOrgCode: '', // 领证机关代码 ,
                vsaOrgCodeName: '', // 领证机关 ,
                waterTransfer: '', // 水运中转（0：空，1：✔）
                wrapType: '', // 包装方式
                declaratioMaterialCode: '', // 企业承诺信息 进口填写101040，出口填写102053
                tradeId: '',
                overseasConsignorId: '',
                ownerId: '',
                agentCustId: '',
                origBoxFlagName: '',
                period: '',
                customsCopLimitList: [],
                customsDecUserList: []
            },
            tips: {
                custId: '',
                declPort: '',
                iePort: '',
                manualNo: '',
                contrNo: '',
                ieDate: '',
                tradeCoScc: '',
                tradeCode: '',
                tradeCiqCode: '',
                tradeName: '',
                overseasConsignorCode: '',
                overseasConsignorEname: '',
                ownerCodeScc: '',
                ownerCode: '',
                ownerCiqCode: '',
                ownerName: '',
                agentCodeScc: '',
                agentCode: '',
                declCiqCode: '',
                agentName: '',
                trafMode: '',
                trafName: '',
                voyageNo: '',
                billNo: '',
                tradeMode: '',
                cutMode: '',
                licenseNo: '',
                tradeCountry: '',
                distinatePort: '',
                transMode: '',
                feeMark: '',
                feeRate: '',
                feeCurr: '',
                insurMark: '',
                insurRate: '',
                insurCurr: '',
                otherMark: '',
                otherRate: '',
                otherCurr: '',
                packNo: '',
                wrapType: '',
                grossWet: '',
                netWt: '',
                tradeCountryNo: '',
                entyPortCode: '',
                goodsPlace: '',
                despPortCode: '',
                entryType: '',
                notes: '',
                billType: '',
                markNo: '',
                orgCode: '',
                vsaOrgCode: '',
                inspOrgCode: '',
                despDate: '',
                purpOrgCode: '',
                correlationDeclNo: '',
                correlationReasonFlagName: '',
                origBoxFlagName: ''
            }
        }
    },
    created () {
        this.currentEnterpriseQua = 0
        console.log(this.$route.name)
    },
    methods: {
        // 重置表单数据方法
        resetForm () {
            Object.keys(this.form).forEach(k => {
                this.form[k] = ''
            })
            this.form.customsDeclareEdocRealas = []
            this.form.customsCopLimitList = []
            this.form.customsDecUserList = []
            this.currentEnterpriseQua = 0
            this.$nextTick(() => {
                this.clearFormTips()
            })
        },
        handleMarkNoEnter ($event) {
            if (!this.mainshow) {
                $event.stopPropagation()
                $event.target.blur()
                if (this.enterEvent && this.enterEvent($event) === false) return
                this.handleLastEnter()
            }
        },
        transModeEnter (event) {
            event.stopPropagation()
            this.$nextTick(() => {
                this.nextFocus(event)
            })
        }
    }
}
</script>
